home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1.1 / The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso / 36 / pc_ipc.zip / PC-IPC.DOC < prev    next >
Text File  |  1989-11-22  |  79KB  |  1,757 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.                                       IPC
  13.                                  USER'S MANUAL
  14.  
  15.  
  16.                           Inter-Process Communication
  17.                                     for DOS
  18.  
  19.  
  20.  
  21.                          DONNELLY SOFTWARE ENGINEERING
  22.                                5082 WENDOVER RD.
  23.                              YORBA LINDA, CA  92686
  24.                                  (714) 970-9612
  25.  
  26.  
  27.  
  28.  
  29.                                Table of Contents
  30.  
  31.  
  32.  
  33.                     INTRODUCTION...........................1
  34.                       IPCINST.COM..........................1
  35.                       PC-IPC.COM...........................1
  36.                       IPCLIB.LIB...........................1
  37.                       PC-IPC.H.............................1
  38.                       PC-IPC.DOC...........................1
  39.                       TX_PROC.C and RX_PROC.C..............1
  40.                       IPCSAMP.ASM..........................1
  41.  
  42.                     SYSTEM REQUIREMENTS....................1
  43.  
  44.                     INSTALLATION...........................2
  45.  
  46.                     USAGE..................................3
  47.                       Using IPCINST.COM....................3
  48.                       Using PC-IPC.COM.....................5
  49.                         PC-IPC Commands....................5
  50.                         PC-IPC Parameters..................7
  51.  
  52.                     PC-IPC EXAMPLES........................9
  53.                       Command Line Example.................9
  54.                       Batch Mode Example..................11
  55.                       Batch Mode Within DESQview..........12
  56.  
  57.                     CREATING IPC APPLICATIONS.............14
  58.                       Overview............................14
  59.                       IPC Commands........................16
  60.                       IPC Status..........................19
  61.                       C Bindings for IPCLIB.LIB...........21
  62.                       Creating main().....................22
  63.                       Compiling and Linking...............24
  64.                       Running TX_PROC and RX_PROC.........25
  65.                       Assembly Interface..................26
  66.  
  67.                     ERROR MESSAGES........................27
  68.                       PC-IPC Error Messages...............27
  69.                       PC-IPC Return Status................28
  70.                       IPCLIB Error Messages...............29
  71.  
  72.                     PURCHASE INFORMATION..................31
  73.  
  74.                     ACKNOWLEDGMENTS.......................33
  75.  
  76.                     INDEX.................................34
  77.  
  78.  
  79.  
  80.  
  81.                          Examples, Figures, and Tables
  82.  
  83.  
  84.  
  85.         Example 1 - PC-IPC Command Line Example........................9
  86.         Example 2 - PC-IPC Batch Mode Example.........................11
  87.         Example 3 - PC-IPC Batch Mode Within DESQview.................12
  88.  
  89.         Figure 1 - Sample AUTOEXEC.BAT file............................2
  90.         Figure 2 - Two Representations of an IPC_PARAM_BLOCK..........14
  91.         Figure 3 - Bit-fields of 'status' in IPC_PARAM_BLOCK..........19
  92.  
  93.         Table 1 - Required Values of 'my_id' for IPC Commands.........18
  94.         Table 2 - Inputs, Outputs, and Status for IPC commands........20
  95.         Table 3 - Status Values Returned in ERRORLEVEL................28
  96.  
  97.  
  98.  
  99.                                IPC User's Manual
  100.           IPC 1.0                                                    1
  101.  
  102.  
  103.                                   INTRODUCTION
  104.  
  105.      This set of programs provides the capability of Inter-Process
  106.      Communication for applications running under the MS-DOS operating
  107.      system. It can, for example, be used to pass information between
  108.      separate processes running within DESQview windows, or between batch
  109.      jobs, or your own applications. The set is comprised of 8 files:
  110.  
  111.      IPCINST.COM is the heart of Inter-Process Communication. It is a
  112.        Terminate and Stay Resident (TSR) program that serves as a "Post
  113.        Office" for the messages and data exchanged between processes. A
  114.        process may deposit information into IPC or retrieve information
  115.        from it. The information sent to IPC is maintained in memory until a
  116.        request is made for it. More than one instance of IPC can be
  117.        resident in memory at any time (several Post Offices). IPC can be
  118.        configured to hold from 1 to 52 kilobytes of information (Post
  119.        Office capacity). Any number of messages of any size can be stored
  120.        by IPC within the 52-K memory limit (pieces of mail).
  121.  
  122.      PC-IPC.COM provides the capability to pass information from one
  123.        program to another through DOS's command-line interface. Two methods
  124.        are provided to accomplish this. The first method is an interactive
  125.        mode where messages are sent and received on the command line. The
  126.        second method is designed for batch mode where PC-IPC commands and
  127.        data are contained in batch files and the DOS environment table.
  128.  
  129.      IPCLIB.LIB is a linkable library of functions that provide an
  130.        interface to IPC. Programmers can therefore write their own "C"
  131.        applications to take advantage of IPC's capabilities. Included in
  132.        the library are the IPC interface call, an error handler, an
  133.        initialization routine, a routine to test for IPC's presence, and a
  134.        version identification routine.
  135.  
  136.      PC-IPC.H is the "C" include file for use by application programmers.
  137.        It contains definitions for status codes, commands, error codes, and
  138.        the data structure used for communicating with IPC.
  139.  
  140.      PC-IPC.DOC is this documentation file.
  141.  
  142.      TX_PROC.C and RX_PROC.C are sample C programs that illustrate how to
  143.        use IPCLIB in developing your own applications.
  144.  
  145.      IPCSAMP.ASM is a sample program that demonstrates direct access to IPC
  146.        through assembly language.
  147.  
  148.  
  149.                               SYSTEM REQUIREMENTS
  150.  
  151.      A PC, XT, AT, or 386 compatible with a minimum of 256K, at least one
  152.      floppy disk drive, MDA, HGC, CGA, EGA, or VGA display, DOS 2.0 or
  153.      later (3.0 or later recommended) are required.
  154.  
  155.  
  156.                                IPC User's Manual
  157.           IPC 1.0                                                    2
  158.  
  159.  
  160.                                   INSTALLATION
  161.  
  162.      This section describes how to install and set up IPC on your disk and
  163.      in your computer's memory.
  164.  
  165.      After de-archiving the files IPCINST.COM, PC-IPC.COM, PC-IPC.H, PC-
  166.      IPC.LIB, PC-IPC.DOC, TX_PROC.C, RX_PROC.C and IPCSAMP.ASM, you may
  167.      want to place them in a subdirectory on your hard disk. If you intend
  168.      to use IPCINST.COM and PC-IPC.COM often, they should be placed in a
  169.      directory that is in the DOS path (see SET or PATH in your DOS User's
  170.      Manual). If you want IPC to be resident in memory when you turn on
  171.      your computer, add "IPCINST.COM /V=xx /A=zz" to the file AUTOEXEC.BAT
  172.      in your top-level directory. Figure 1 illustrates a sample
  173.      AUTOEXEC.BAT file. See the "USAGE" section below for an explanation of
  174.      the command parameters /V and /A.
  175.  
  176.      ______________________________________________________________________
  177.              ECHO OFF
  178.              PATH C:\DOS;C:\;C:\TURBOC;C:\IPC
  179.              IPCINST.COM /V=62 /A=3
  180.              DATE
  181.              TIME
  182.              ECHO ON
  183.  
  184.           Figure 1 - Sample AUTOEXEC.BAT file. The PATH command
  185.           points to, among others, a subdirectory on drive C:
  186.           called IPC. Assuming that all IPC files are in C:\IPC,
  187.           DOS will be able to run them regardless of what the
  188.           default drive or directory is.
  189.      ______________________________________________________________________
  190.  
  191.  
  192.      If you would rather not have IPC resident in memory all the time, you
  193.      can install it whenever you like. This can be done either at the
  194.      command line or within a Batch file. The format of the command is the
  195.      same as when used in AUTOEXEC.BAT. Please note that because IPC is a
  196.      TSR, once it is installed, it remains in memory until the computer is
  197.      restarted.
  198.  
  199.      IPC can be used in conjunction with DESQview, the multi-tasking
  200.      operating system. IPCINST.COM must be run prior to starting DESQview.
  201.      Otherwise, IPC is "hidden" within a DESQview window and cannot be
  202.      accessed by programs (such as PC-IPC.COM) running in other windows.
  203.      You may add the line "IPCINST.COM /V=xx /A=zz" to the batch file
  204.      DV.BAT before the line "DV %1 %2 %3 %4 %5". Or you can install IPC at
  205.      the command line prior to starting DESQview. For example,
  206.  
  207.              C>ipcinst /v=60 /a=4
  208.              C>dv
  209.  
  210.  
  211.                                IPC User's Manual
  212.           IPC 1.0                                                    3
  213.  
  214.  
  215.                                      USAGE
  216.  
  217.      This section describes the usage of and the various parameters for
  218.      IPCINST.COM and PC-IPC.COM.
  219.  
  220.  
  221.      Using IPCINST.COM : IPCINST /V=xx /A=zz
  222.  
  223.          /V=xx (an optional parameter)
  224.  
  225.      The memory-resident program IPCINST.COM requires an interrupt vector
  226.      from the Interrupt Vector Table (IVT) which occupies the first 1024
  227.      bytes of your computer's memory. You can specify which one of the 256
  228.      vectors (addresses) IPC should use. You cannot pick just any vector
  229.      since many are used by DOS, ROM-BIOS, EMS memory, the 80x86 processor,
  230.      hardware interrupts, other TSRs, etc. Although many vectors are
  231.      standard, every computer manufacturer, add-on board manufacturer,
  232.      software package, and especially TSRs, may use any of the vectors in
  233.      the IVT. This makes your hardware / software configuration unique.
  234.      Therefore IPC makes no demands that a particular vector be available.
  235.  
  236.      The "/V=xx" parameter allows you to tell IPC which vector to use. "xx"
  237.      is the vector number, in hexidecimal (hexidecimal sequence: 0, 1, 2
  238.      ... 8, 9, A, B ... E, F, 10, 11 ... 19, 1A ... 1F, 20 ...) in the
  239.      range 00 through FF. For a "standard" PC, vectors 4B through 66
  240.      inclusive and 78 through FF inclusive are generally available. By
  241.      default, IPCINST.COM uses vector 60 (i.e. /V=60). If you omit this
  242.      optional parameter and do not receive an error, vector 60 is used by
  243.      IPC. IPCINST.COM will not install if the specified vector is already
  244.      in use.
  245.  
  246.      You can install as many IPC "Post Offices" as will fit in memory and
  247.      in the Interrupt Vector Table. Each vector that IPC uses represents
  248.      another "Post Office". Each instance of IPC is independent of any
  249.      others. In other words, IPCs do not communicate with each other. Which
  250.      IPC instance a program communicates with is determined by PC-IPC.COM
  251.      (and IPCLIB.LIB). The following establishes 3 instances of IPC in
  252.      memory:
  253.  
  254.              C>ipcinst /v=61
  255.              C>ipcinst /v=6E
  256.              C>ipcinst
  257.  
  258.      Note that the /V parameter is not specified in the last command. This
  259.      last instance of IPC uses the default vector 60 (hex). The first and
  260.      second instances use vectors 61 and 6E, respectively.
  261.  
  262.  
  263.          /A=zz (an optional parameter)
  264.  
  265.      Normally, IPC reserves 1024 bytes (1K) of memory to store messages.
  266.      This may be increased (up to 52K) by using the /A parameter when
  267.      installing IPC in memory. "zz" can be any number between 1 and 52
  268.      (decimal). In addition to the memory reserved for messages, space is
  269.  
  270.  
  271.                                IPC User's Manual
  272.           IPC 1.0                                                    4
  273.  
  274.  
  275.      needed by IPC's code: approximately 12K. The least amount of memory
  276.      each instance of IPC uses is 13K, and at most 64K. If, for example,
  277.      you run the following batch file:
  278.  
  279.              echo off
  280.              echo Installing IPC
  281.              ipcinst /v=7D /a=40
  282.              ipcinst /a=15
  283.              ipcinst /v=D9
  284.              echo IPC installed at vectors 7D, 60, and D9
  285.              echo on
  286.  
  287.      the first IPC instance uses 52K, the second 27K, and the last 13K, for
  288.      a total of 92K. The amount of memory set aside for messages in this
  289.      example is enough to contain almost 18 pages of single-spaced, 1-inch
  290.      margined text. Assuming that the total memory on your system is 512K,
  291.      and that DOS and COMMAND.COM occupy 50K, and that no other memory
  292.      resident programs are loaded, you would have about 370K left for
  293.      running programs.
  294.  
  295.      Remember that memory reserved by IPC is no longer available to run
  296.      other programs until the computer is restarted.
  297.  
  298.  
  299.                                IPC User's Manual
  300.           IPC 1.0                                                    5
  301.  
  302.  
  303.      Using PC-IPC.COM : PC-IPC parameter(s) command
  304.  
  305.      Parameters and commands must be separated by spaces. Only one IPC
  306.      command may appear on the command line. If more than one command is
  307.      present, the last is taken used and the others are ignored. With one
  308.      exception, commands and parameters may appear anywhere on the command
  309.      line (see /S, below).
  310.  
  311.          PC-IPC Commands
  312.  
  313.      There are 12 commands that PC-IPC can use for communicating with the
  314.      memory resident IPC. Six of these deal with transmitting data to and
  315.      from IPC. Two provide information about IPC. Two control IPC's ability
  316.      to send and receive messages. The last two provide a method of routing
  317.      the messages with identification tags.
  318.  
  319.              IPC Communication
  320.  
  321.      /S=data  /S=(id)data
  322.  
  323.      The /S commands allow you to send data to IPC. The data may be any
  324.      valid ASCII characters. Whitespace characters (space, tab) are
  325.      compressed to a single space. If multiple spaces or tabs are desired,
  326.      enclose the entire command in double quotes. For example,
  327.  
  328.              C>pc-ipc "/S=Now is  the   time"
  329.  
  330.      preserves the spacing as it appears on the command line. If the double
  331.      quotes are not present, multiple spaces between words are compressed
  332.      to one space. All characters on the command line that appear after the
  333.      /S commands are taken as data. Therefore, the /S commands should
  334.      appear last on the command line.
  335.  
  336.      The (id) command qualifier "addresses" the data to a particular
  337.      process (see /G and /I, below). Note that the parentheses are required
  338.      but are not included with the data saved by IPC. Therefore,
  339.  
  340.              C>pc-ipc /S=(7)Hello process #7, I'm ready for data!
  341.  
  342.      sends "Hello process #7, I'm ready for data!" to Process-7. If no
  343.      process id is specified, the default is 0 ( /S=(0)data is equivalent
  344.      to /S=data ).
  345.  
  346.      All messages sent to IPC by PC-IPC are "NULL terminated strings." A
  347.      NULL character has the ASCII value of zero and is used by C (and other
  348.      languages) to signal the end of a character string. PC-IPC
  349.      automatically appends a NULL to every message it sends to IPC. So if
  350.      the message is "/s=123456789", IPC actually receives ten ASCII
  351.      characters: "49 50 51 52 53 54 55 56 57 00" (decimal).
  352.  
  353.      In addition to the NULL character that PC-IPC appends to each message,
  354.      IPC requires 22 bytes of overhead for each message it stores. These 22
  355.      bytes are used by IPC to keep track of the message's location, the
  356.      sender's and recipient's process ids, and the size of the message.
  357.  
  358.  
  359.                                IPC User's Manual
  360.           IPC 1.0                                                    6
  361.  
  362.  
  363.      Using the previous example, 32 bytes (9 characters + 1 NULL + 22
  364.      overhead bytes) of message space are required to store the message.
  365.  
  366.      /R  /R=file
  367.      /W  /W=file
  368.  
  369.      The /R and /W commands allow you to retrieve data from IPC. The /R
  370.      command requests it immediately. The data is displayed on the standard
  371.      output. The /R=file command is similar to /R except the data is
  372.      written to disk. The specified file may be any valid pathname (e.g.
  373.      /R=A:\IPCDATA\PROC1.DAT). If the file already exists, the requested
  374.      data is appended to the end of the file. For both /R and /R=file, if
  375.      IPC has no data the message "(No Data Available)" is written to the
  376.      standard output.
  377.  
  378.      The /W commands are similar to the /R commands except that if no data
  379.      is available at the time the request is made, PC-IPC will wait until
  380.      data is available for the process making the request (see /I, below).
  381.      This command should only be used when PC-IPC is running in a multi-
  382.      processing environment.
  383.  
  384.      A message can only be retrieved once from IPC. When a message is
  385.      retrieved, it is erased from IPC's list.
  386.  
  387.              IPC Information
  388.  
  389.      /H
  390.  
  391.      The /H (help) command displays a brief description of the valid
  392.      parameters and commands PC-IPC.COM recognizes.
  393.  
  394.      /Q
  395.  
  396.      The /Q (query) command checks to see if IPC is resident in memory,
  397.      determines the number of messages available for the requesting
  398.      process, and calculates the amount of free message space. For example,
  399.      assume that Process-2 sends one message, Process-3 sends three
  400.      messages, and Process-5 sends one message all addressed to Process-4.
  401.      When Process-4 issues the command "pc-ipc /i=4 /q", the following
  402.      status message appears on the display, "5 Messages Available. 743
  403.      Bytes Free Space. IPC is Installed, Enabled".
  404.  
  405.              IPC Control
  406.  
  407.      /D
  408.  
  409.      IPC can be disabled so that it will no longer respond to Communication
  410.      commands (/R, /W, /S). While disabled IPC still responds to any
  411.      information requests (/Q and /H). Turning IPC off is not the same as
  412.      removing it from memory (only rebooting the system can do that). The
  413.      process id that disables IPC is the only one that can enable it again.
  414.      The process id that disables IPC must be "recognized" by IPC (see /G).
  415.  
  416.      /E
  417.  
  418.  
  419.                                IPC User's Manual
  420.           IPC 1.0                                                    7
  421.  
  422.  
  423.  
  424.      The /E command, when issued by the same process id that issued the /D
  425.      command, reenables IPC to accept Communication commands.
  426.  
  427.              IPC Routing
  428.  
  429.      /G  /G=n
  430.  
  431.      If a process requires a unique handle or id for either sending or
  432.      receiving messages, it can use the /G command to obtain one (or more).
  433.      IPC maintains a list of 10 process ids (numbered 0 through 9). When a
  434.      process requests an id with the /G command, IPC marks that id as "in
  435.      use" and will not reissue that id until it has been relinquished
  436.      (using /G=n).
  437.  
  438.      A process id obtained using /G is said to be "recognized" by IPC. A
  439.      "valid" id is a number between 0 and 9 that may not necessarily have
  440.      been obtained using /G. Except for /D and /G=n, IPC responds to any
  441.      command from a valid process id. Therefore, it is not necessary to use
  442.      the /G command to send or receive messages.
  443.  
  444.      Typically, the /G command would be the first command a process would
  445.      send to IPC. When the process is about to finish, or no longer needs
  446.      the id, the /G=n command relinquishes the id "n", making it available
  447.      for other processes. Until specifically relinquished, the id remains
  448.      "in use", even if the process terminates.
  449.  
  450.          PC-IPC Parameters
  451.  
  452.      /B  /B=setvar
  453.  
  454.      The /B parameter tells PC-IPC that it is running in batch mode. All
  455.      output that PC-IPC normally sends to the display is instead placed in
  456.      the process's environment table and in COMMAND.COM's environment table
  457.      (see the SET command in the MS-DOS User's Manual). This is useful in
  458.      batch processes for obtaining, for instance, a process id. If a
  459.      variable name (setvar) is not specified, PC-IPC creates one with the
  460.      following format: IPCvvi=data, where "IPC" is constant, "vv" is the
  461.      vector number of IPC, "i" is the process id, and "data" is the data
  462.      requested by Process-i.
  463.  
  464.      The /B=setvar parameter allows the process to specify the variable
  465.      name to use. The variable name must be less than 9 characters in
  466.      length.
  467.  
  468.      For versions of DOS lower than 3.0, the /B parameter is of limited
  469.      usefulness because the environment size is limited to 160 bytes. For
  470.      versions 3.0 and later, the environment size can be set in the
  471.      CONFIG.SYS file by including the line "SHELL=C:\COMMAND.COM /P
  472.      /E:nnnnn". The "/P" parameter makes COMMAND.COM remain in memory and
  473.      forces execution of AUTOEXEC.BAT. The "/E:nnnnn" parameter specifies
  474.      the size of the environment. For DOS versions between 3.00 and 3.10
  475.      "nnnnn" is the environment size in 16-byte paragraphs: range 10 - 62
  476.      (160 to 992 bytes). For DOS versions 3.20 and greater, "nnnnn" is the
  477.      environment size in bytes: range 160 - 16384.
  478.  
  479.  
  480.                                IPC User's Manual
  481.           IPC 1.0                                                    8
  482.  
  483.  
  484.  
  485.      /I=n
  486.  
  487.      The /I parameter allows a process to identify itself to IPC. If this
  488.      parameter is not specified, 0 is the default (i.e. /I=0). "n" must be
  489.      a "valid" id (0 through 9).
  490.  
  491.      "n" does not need be obtained by the currently running process. For
  492.      example, if you type "pc-ipc /g" on the command line, PC-IPC displays
  493.      "1". Technically speaking, you just ran a process (a DOS process). If
  494.      you then run another DOS process by entering "pc-ipc /i=1 /s=Howdy
  495.      Doody", IPC accepts and stores the message. IPC is not "aware" that
  496.      two separate DOS processes were involved.
  497.  
  498.      /V=xx
  499.  
  500.      The /V parameter is equivalent to the /V parameter for IPCINST.COM. It
  501.      specifies the vector (Post Office) to use when calling IPC. The
  502.      default, as with IPCINST.COM, is 60 (hex).
  503.  
  504.  
  505.                                IPC User's Manual
  506.           IPC 1.0                                                    9
  507.  
  508.  
  509.                                 PC-IPC EXAMPLES
  510.  
  511.      This section presents examples of the command line interface to IPC:
  512.      PC-IPC.COM.
  513.  
  514.      EXAMPLE 1 : This example shows how to install IPC and use PC-IPC to
  515.      send and receive data. The commands to be entered are shown at the
  516.      "A>" prompt. The program's response is shown below the command. A
  517.      descriptive comment is shown to the right of the command.
  518.  
  519.          A>IPCINST /V=60 /A=3                Install IPC at vector 60H
  520.                                              reserving 3K for messages
  521.  
  522.          IPC-INSTALL 1.0 Copyright (c) 1989, Donnelly Software Engineering.
  523.          IPC Installed at vector 60h.
  524.          3072 bytes available for messages (52902 maximum).
  525.  
  526.          A>PC-IPC /Q                         Check to see that IPC is
  527.                                              installed and ready for
  528.                                              messages
  529.  
  530.          0 Messages Available. 3072 Bytes Free Space. IPC is Installed,
  531.          Enabled.
  532.  
  533.          A>PC-IPC /S=Abraham Lincoln         Send a message from Process-0
  534.                                              to Process-0 (the default
  535.                                              process-id)
  536.  
  537.          A>PC-IPC /R                         Retrieve the message just sent
  538.  
  539.          Abraham Lincoln
  540.  
  541.          A>PC-IPC /G                         Get a process-id from IPC
  542.  
  543.          1
  544.  
  545.                                              Send messages to Process-1
  546.          A>PC-IPC /S=(1)Four score and 7 years ago
  547.          A>PC-IPC "/S=(1)our  fathers  brought  forth  on  this  continent"
  548.          A>PC-IPC /S=(1)a    new nation,    conceived in liberty,
  549.  
  550.          A>PC-IPC /R                         Get a message for Process-0
  551.  
  552.          (No Data Available)
  553.  
  554.          A>PC-IPC /I=1 /Q                    Check for Process-1 messages
  555.  
  556.          3 Messages Available. 2890 Bytes Free Space. IPC is Installed,
  557.          Enabled.
  558.  
  559.          A>PC-IPC /I=1 /R=LINCOLN.TXT        Get a message and put it in a
  560.                                              file LINCOLN.TXT
  561.  
  562.          (In file LINCOLN.TXT)
  563.  
  564.  
  565.                                IPC User's Manual
  566.           IPC 1.0                                                   10
  567.  
  568.  
  569.  
  570.          A>TYPE LINCOLN.TXT                  Type the file
  571.  
  572.          Four score and 7 years ago
  573.  
  574.                                              Send a message from Process-1
  575.                                              to Process-0
  576.          A>PC-IPC /I=1 /S=(0)and dedicated to the proposition,
  577.  
  578.          A>PC-IPC /I=1 /R                    Get the next message for
  579.                                              Process-1 (note the effect of
  580.                                              the quotes on the spacing)
  581.  
  582.          our  fathers  brought  forth  on  this  continent
  583.  
  584.          A>PC-IPC /R                         Get the next message for
  585.                                              Process-0
  586.  
  587.          and dedicated to the proposition,
  588.  
  589.          A>PC-IPC /I=1 /R                    Get the next message (note the
  590.                                              effect on spacing with no
  591.                                              quotes)
  592.  
  593.          a new nation, conceived in liberty,
  594.  
  595.          A>PC-IPC /G=1                       Give up id-1
  596.  
  597.  
  598.                                IPC User's Manual
  599.           IPC 1.0                                                   11
  600.  
  601.  
  602.      This section presents examples of the batch mode interface to IPC.
  603.  
  604.      EXAMPLE 2 : This example illustrates the use of PC-IPC in a batch
  605.      file. First, a request is made for a unique ID which is saved in the
  606.      environment table as "myid". Then a request is made to determine if
  607.      any messages are available. While there are messages available, the
  608.      program writes the message to a file and loops to get another. When
  609.      there are no more messages, the data file is displayed, the
  610.      environment variables are deleted and the process ends. You may want
  611.      to use a text editor to cut this example from this .DOC file and paste
  612.      it into a .BAT file.
  613.  
  614.      echo off
  615.      REM This batch file assumes that IPC is already installed and that
  616.      REM one or more messages have already been sent to IPC for the
  617.      REM process id that will be returned from the /g command. To
  618.      REM do this, enter the following at the command line:
  619.      REM
  620.      REM             A>ipcinst
  621.      REM             A>pc-ipc /s=(1)Goldy Locks
  622.      REM             A>pc-ipc /s=(1), Papa Bear
  623.      REM             A>pc-ipc /s=(1), Mama Bear
  624.      REM             A>pc-ipc /s=(1)and Baby Bear
  625.      REM
  626.      REM     Get an ID from IPC and put it in the environment.
  627.      pc-ipc /b=myid /g
  628.      :AGAIN
  629.      REM     Use that ID to get a count of available messages.
  630.      pc-ipc /b=procdata /i=%myid% /q
  631.      REM     Test to see if any messages are available.
  632.      if %procdata%==0 goto DONE
  633.      REM     Use the ID to write the message to a file.
  634.      pc-ipc /i=%myid% /r=mydata%myid%.txt
  635.      REM     Loop until there are no more messages.
  636.      goto AGAIN
  637.      :DONE
  638.      REM Type the file containing the messages.
  639.      echo Typing mydata%myid%.txt...
  640.      type mydata%myid%.txt
  641.      REM     Clean up before leaving.
  642.      REM     Relinquish ID.
  643.      pc-ipc /g=%myid%
  644.      REM     Conserve environment space.
  645.      set procdata=
  646.      set myid=
  647.      echo on
  648.      exit
  649.  
  650.  
  651.                                IPC User's Manual
  652.           IPC 1.0                                                   12
  653.  
  654.  
  655.      This section illustrates the use of PC-IPC within 2 DESQview windows.
  656.  
  657.      EXAMPLE 3 : The two batch files each run within separate "DOS (128K)"
  658.      windows. The first batch file continuously sends messages to IPC until
  659.      IPC's message space is full and then terminates. The second batch file
  660.      continuously retrieves messages from IPC. When no more messages are
  661.      available, it terminates.
  662.  
  663.      In order to run this example, first make certain that IPC is installed
  664.      (run IPCINST.COM) prior to starting DESQview. Next, open two "DOS
  665.      (128K)" windows. Arrange the windows so that they are both visible. In
  666.      the first window start the batch file FILLIPC.BAT. It begins sending
  667.      messages to IPC. Switch to the second window and start MTIPC.BAT. It
  668.      begins retrieving messages from IPC. Depending upon which window is
  669.      the "foreground process," and the ratio of "foreground ticks" to
  670.      "background ticks", the number of available messages increases or
  671.      decreases. Try switching between windows to see the effect on
  672.      available messages.
  673.  
  674.      ECHO OFF
  675.      REM FILE : FILLIPC.BAT
  676.      ECHO FILLING IPC TO CAPACITY...
  677.      REM    Note the use of IF ERRORLEVEL... for status checking.
  678.      REM    (See "PC-IPC Return Status" section)
  679.      REM Check that IPC is installed
  680.      PC-IPC /Q
  681.      IF ERRORLEVEL 12 GOTO DONE
  682.      :LOOP
  683.      PC-IPC /S=Tish! I love it when you speak French! -- Gomez Addams
  684.      REM Quit if IPC is full
  685.      IF ERRORLEVEL 11 GOTO DONE
  686.      REM Display message count, available memory
  687.      PC-IPC /Q
  688.      GOTO LOOP
  689.      :DONE
  690.      ECHO ON
  691.  
  692.  
  693.      ECHO OFF
  694.      REM FILE : MTIPC.BAT
  695.      ECHO EMPTYING IPC...
  696.      REM Check that IPC is installed
  697.      PC-IPC /Q
  698.      IF ERRORLEVEL 12 GOTO DONE
  699.      :LOOP
  700.      REM Put the message in environment variable MSG
  701.      PC-IPC /B=MSG /Q
  702.      ECHO %MSG%
  703.      IF %MSG%==0 GOTO DONE
  704.      PC-IPC /R
  705.      GOTO LOOP
  706.      :DONE
  707.      ECHO ON
  708.  
  709.  
  710.  
  711.                                IPC User's Manual
  712.           IPC 1.0                                                   13
  713.  
  714.  
  715.      Another experiment that can be performed within DESQview is to disable
  716.      IPC. Start FILLIPC.BAT in one window. While it is running, switch to
  717.      the other window and type "pc-ipc /d". This disables IPC message
  718.      processing. FILLIPC continues to run because no check is performed
  719.      within the loop for a "disabled" status. To resume sending data, type
  720.      "pc-ipc /e" in the second window.
  721.  
  722.  
  723.                                IPC User's Manual
  724.           IPC 1.0                                                   14
  725.  
  726.  
  727.                            CREATING IPC APPLICATIONS
  728.  
  729.      This section discusses the design and implementation of your own
  730.      applications using IPC. It is assumed here that you are familiar with
  731.      the C programming language, and have access to a C compiler and a
  732.      linker.
  733.  
  734.          Overview
  735.  
  736.      The object library IPCLIB.LIB is supplied with this product to enable
  737.      you to write your own applications that take advantage of IPC's
  738.      abilities. But before a detailed discussion of the mechanics of code
  739.      writing, this is how IPC works from an application's point of view.
  740.  
  741.      IPC is a TSR that is called through an interrupt vector assigned when
  742.      it is loaded into memory. All information passed to and from IPC uses
  743.      a data structure known as an IPC_PARAM_BLOCK (Figure 2). The
  744.      IPC_PARAM_BLOCK contains the command IPC is to perform, the data it is
  745.      to process and its size, the sending-process id, the receiving-process
  746.      id, and status and error codes.
  747.  
  748.      ______________________________________________________________________
  749.  
  750.      0               15                31        struct IPC_PARAM_BLOCK
  751.      +---------------------------------+         {
  752.      |   my_id        |     to_id      |         unsigned int my_id;
  753.      +---------------------------------+         unsigned int to_id;
  754.      |  command       |    status      |         unsigned int command;
  755.      +---------------------------------+         unsigned int error;
  756.      |   error        |     size       |         unsigned int status;
  757.      +---------------------------------+         unsigned int size;
  758.      |          data_ptr               |         void far *data_ptr;
  759.      +---------------------------------+         };
  760.  
  761.                       a)                                 b)
  762.  
  763.           Figure 2 - Two Representations of an IPC_PARAM_BLOCK. a) The
  764.           first six fields are each 16 bits wide, the data pointer is
  765.           32 bits wide. b) This is the C structure similar to that
  766.           found in the include file PC-IPC.H.
  767.      ______________________________________________________________________
  768.  
  769.      When an application sends a message to IPC, the data is copied to
  770.      memory that is within IPC's control. Once the data has been copied,
  771.      the application may modify or delete its own data. In fact, the
  772.      application can terminate (freeing its memory), without affecting
  773.      IPC's copy. IPC dynamically allocates enough memory for each message
  774.      sent. The only data "too big" to fit inside IPC is that which exceeds
  775.      the limit set by the /A parameter when IPC was installed.
  776.  
  777.      Retrieving data from IPC is the inverse of sending data. The
  778.      application supplies a destination for the data (in the 'data_ptr'
  779.      field). IPC copies the the first message in its list for that process
  780.      (identified by the 'my_id' field), and fills the 'size' field with the
  781.  
  782.  
  783.                                IPC User's Manual
  784.           IPC 1.0                                                   15
  785.  
  786.  
  787.      number of bytes copied. Subsequent requests for data by the same
  788.      'my_id' will retrieve the next available message in IPC's list. Each
  789.      message is copied to the memory location specified in 'data_ptr' and
  790.      then deleted from IPC's list. You must make certain that the buffer to
  791.      which IPC copies the data is large enough to hold the largest
  792.      anticipated message. Otherwise, IPC may overwrite your application's
  793.      code or data. In the case where no data is available for 'my_id', IPC
  794.      sets the 'size' field to zero and clears the 'avdata' flag in the
  795.      'status' field (see the "IPC Status" section).
  796.  
  797.  
  798.                                IPC User's Manual
  799.           IPC 1.0                                                   16
  800.  
  801.  
  802.          IPC Commands
  803.  
  804.      The following commands are defined in PC-IPC.H and are recognized as
  805.      valid entries for the 'command' field:
  806.  
  807.              IPC_CMND_INQUIRE
  808.  
  809.      Inquire of IPC its current state. The 'status' field is set to
  810.      indicate whether IPC is installed, enabled, in error, and if data is
  811.      available. If any messages are available for the process id specified
  812.      in 'my_id', the number of messages is returned in 'size' and the
  813.      'avdata' flag in 'status' is set. If 'data_ptr' contains a valid
  814.      pointer (i.e. is not zero), an unsigned integer representing the
  815.      amount of free message space (in bytes) is written to the location
  816.      specified in 'data_ptr'.
  817.  
  818.      You may want to use a union to retrieve the amount of free memory. If
  819.      you send a far pointer to a character array in 'data_ptr',  you may
  820.      have difficulty using the unsigned integer that IPC returns. If, for
  821.      example, you define the following union variable,
  822.  
  823.              union { char    str_data[256];
  824.                      int     int_data;
  825.                    } data_block;
  826.  
  827.      you can then initialize 'data_ptr' with either of the following
  828.      statements:
  829.  
  830.              init_param_block(param_ptr, my_id, to_id, IPC_CMND_INQUIRE, 0,
  831.                              data_block.str_data);
  832.      or,
  833.              init_param_block(param_ptr, my_id, to_id, IPC_CMND_INQUIRE, 0,
  834.                              &data_block.int_data);
  835.  
  836.      In either case you have access to whichever type of data IPC returns.
  837.      If you use the first example prior to calling IPC, IPC returns an
  838.      unsigned int to the location in 'data_ptr'. Your application can
  839.      access the data as follows:
  840.  
  841.              printf("%u Messages Available. %u Bytes Free Space.\n",
  842.                      param_ptr->size, data_block.int_data);
  843.  
  844.              IPC_CMND_ENABLE
  845.  
  846.      IPC compares the value contained in 'my_id' with the process id that
  847.      disabled IPC. If the values are the same, IPC is again available to
  848.      receive and send data. Otherwise, the 'error' flag in 'status' is set
  849.      and 'error' contains the value of the error.
  850.  
  851.              IPC_CMND_DISABLE
  852.  
  853.      Any process with a recognized 'my_id' (one obtained using the
  854.      IPC_CMND_REQID command) may disable IPC. While disabled, the only
  855.      commands IPC will respond to are IPC_CMND_INSTALL, IPC_CMND_VERS,
  856.      IPC_CMND_INQUIRE, and IPC_CMND_ENABLE.
  857.  
  858.  
  859.                                IPC User's Manual
  860.           IPC 1.0                                                   17
  861.  
  862.  
  863.  
  864.              IPC_CMND_INSTALL
  865.  
  866.      IPC can be reset using this command. Resetting IPC deletes all
  867.      messages in IPC's list, and sets the internal status flag to the
  868.      normal condition (installed, enabled, no data, no error). The value of
  869.      'my_id' must be zero. When you first install IPC using IPCINST.COM, it
  870.      calls itself with this command to verify that the installation went
  871.      properly.
  872.  
  873.              IPC_CMND_RDATA
  874.  
  875.      Use this command to retrieve data from IPC. IPC returns the first
  876.      available message in its list that corresponds to the value sent in
  877.      'my_id'. IPC then copies the message to the location specified in
  878.      'data_ptr'. In order for your application to determine the id of the
  879.      process that sent the message, the sending process' id is returned in
  880.      'to_id'. The size of the message, in bytes, is returned in 'size'. The
  881.      'avdata' flag in 'status' is set. The message is deleted from IPC's
  882.      list. If no message is available for 'my_id', 'avdata' is cleared, and
  883.      'size' is set to zero.
  884.  
  885.              IPC_CMND_RDATAW
  886.  
  887.      The only difference between this command and IPC_CMND_RDATA is that
  888.      IPC will only return if there is a message available in its list for
  889.      the process specified in 'my_id'. IPC will put your application "on
  890.      hold" until a message is available. This command should only be used
  891.      in a multi-process environment (such as DESQview).
  892.  
  893.              IPC_CMND_SDATA
  894.  
  895.      This command copies the data located by the far pointer 'data_ptr' to
  896.      an internal message list for the number of bytes specified in 'size'.
  897.      It also saves 'my_id' and 'to_id' and associates them with the
  898.      message. This requires 22 bytes of overhead for each message IPC
  899.      stores. Therefore, each message uses 'size' + 22 bytes of IPC message
  900.      space.
  901.  
  902.              IPC_CMND_REQID
  903.  
  904.      Your application can obtain one or more (9 total) unique ids from IPC
  905.      that can be used for message routing. The new id is returned in
  906.      'my_id'. Also, if there are any messages already available for the
  907.      newly allocated id, the 'avdata' flag is set in 'status'.
  908.  
  909.      To IPC, there are two types of process ids. There are "valid" process
  910.      ids and there are "recognized" process ids. A valid process id is any
  911.      number between 0 and 9, inclusive. A recognized process id is one that
  912.      is currently marked "in use", or allocated, by IPC. Many commands
  913.      require that the value sent in 'my_id' be one of these types. Table 1
  914.      summarizes these requirements. Notice that only a valid id is needed
  915.      to Read Data or Send Data. Therefore, a process may assume, or take
  916.      on, the id of another process. Or, your application may "hard-wire"
  917.      process ids into the code.
  918.  
  919.  
  920.                                IPC User's Manual
  921.           IPC 1.0                                                   18
  922.  
  923.  
  924.  
  925.      ______________________________________________________________________
  926.  
  927.                      Command                 my_id
  928.                      ---------------         -----------
  929.                      Inquire                 Valid
  930.                      Enable                  Disable Id
  931.                      Disable                 Recognized
  932.                      Install                 0
  933.                      Read Data               Valid
  934.                      Read Data Wait          Valid
  935.                      Send Data               Valid
  936.                      Request ID              Don't Care
  937.                      Delete ID               Recognized
  938.                      Version                 Don't Care
  939.  
  940.           Table 1 - Required Values of 'my_id' for IPC Commands.
  941.      ______________________________________________________________________
  942.  
  943.  
  944.              IPC_CMND_DELID
  945.  
  946.      A process id can be returned to IPC's pool of available ids using this
  947.      command. The value contained in 'my_id' must be the same as an id that
  948.      is marked by IPC as "in-use." Process ids need not be returned in the
  949.      same order they were assigned.
  950.  
  951.              IPC_CMND_VERS
  952.  
  953.      This command copies a character string, that represents the current
  954.      version of IPC, to the location specified in 'data_ptr'. The length of
  955.      the string is returned in 'size'.
  956.  
  957.  
  958.                                IPC User's Manual
  959.           IPC 1.0                                                   19
  960.  
  961.  
  962.          IPC Status
  963.  
  964.      IPC returns the status of each operation in the 'status' field of the
  965.      IPC_PARAM_BLOCK. By performing bit-wise comparisons on 'status'
  966.      information about IPC can be determined. The bit-fields of 'status'
  967.      are shown in Figure 3. If the error bit is set, the error code is
  968.      returned in the 'error' field of the IPC_PARAM_BLOCK. Otherwise,
  969.      'error' is zero.
  970.  
  971.      ______________________________________________________________________
  972.          15                                                          0
  973.        +---------------------------------------------------------------+
  974.        |   |   |   |   |   |   |   |   |   |   |   | A | R | I | E |   |
  975.        +---------------------------------------------------------------+
  976.  
  977.           Figure 3 - Bit-fields of 'status' in IPC_PARAM_BLOCK.
  978.           Blank fields are unused.
  979.           E : if set, IPC is enabled.
  980.           I : if set, IPC is installed.
  981.           R : if set, an error occurred, error code is returned
  982.               in 'error' field of IPC_PARAM_BLOCK.
  983.           A : if set, one or more messages are available in IPC's
  984.               list for the process id specified in 'my_id'.
  985.      ______________________________________________________________________
  986.  
  987.      Defines are provided in PC-IPC.H for performing the bit-wise
  988.      comparisons. For instance, to determine if an error resulted from the
  989.      last call to IPC, your application can do either of the following:
  990.  
  991.              if (param.status & IPC_STAT_ERROR)
  992.                  ipc_error(param.error);
  993.      or,
  994.              if (param.error)
  995.                  ipc_error(param.error);
  996.  
  997.      The required input fields, required output fields, and status returns
  998.      are summarized in Table 2.
  999.  
  1000.  
  1001.  
  1002.                                IPC User's Manual
  1003.           IPC 1.0                                                   20
  1004.  
  1005.  
  1006.      ______________________________________________________________________
  1007.                                                            STATUS (1)  ERROR
  1008.    COMMAND         INPUT               OUTPUT              I E A R     VALUE
  1009.    --------------  ----------------    ----------          -------     -----
  1010.    Inquire (2)     my_id, data_ptr     size, data_ptr      x x x x       x
  1011.    Enable          my_id (3)                               x x   x       x
  1012.    Disable         my_id (4)                               x x   x       x
  1013.    Install         my_id (5)                               x x   x       x
  1014.    Read Data       my_id, data_ptr     data_ptr, size,     x x x x       x
  1015.                                        to_id (6)
  1016.    Read Data Wait  my_id, data_ptr     data_ptr, size,     x x x x       x
  1017.                                        to_id (6)
  1018.    Send Data       my_id, to_id,       size (7)            x x   x       x
  1019.                    data_ptr, size
  1020.    Request ID      my_id               my_id               x x x x       x
  1021.    Delete ID       my_id (4)                               x x   x       x
  1022.    Version         data_ptr            data_ptr, size      x x
  1023.  
  1024.           Table 2 - Inputs, Outputs, and Status for IPC commands. "x"
  1025.           indicates where IPC may set the flag or value.
  1026.      (1) Status Flags I:Installed, E:Enabled, A:Available Data, R:Error.
  1027.      (2) The number of available messages for process 'my_id' is returned
  1028.          in 'size'. If 'data_ptr' contains a valid destination address
  1029.          (i.e. not zero), the size of free message space (in bytes) is
  1030.          returned through 'data_ptr'.
  1031.      (3) 'my_id' must match that used in Disable.
  1032.      (4) Must be a recognized process id (i.e. one that is currently
  1033.          allocated).
  1034.      (5) Must be process id zero (0).
  1035.      (6) 'to_id' contains the message sender's id.
  1036.      (7) If Send Data is unsuccessful due to insufficient memory, the
  1037.          amount of available message space is returned in 'size'.
  1038.      ______________________________________________________________________
  1039.  
  1040.  
  1041.  
  1042.                                IPC User's Manual
  1043.           IPC 1.0                                                   21
  1044.  
  1045.  
  1046.          C Bindings for IPCLIB.LIB
  1047.  
  1048.              void far pc_ipc(unsigned int vector,
  1049.                                      IPC_PARAM_BLOCK far *param_ptr)
  1050.  
  1051.      This is the interface to the memory-resident portion of IPC. The two
  1052.      parameters are the vector number for IPC's interrupt, and a far
  1053.      pointer to the parameter block. Note that 'param_ptr' is a far (32-
  1054.      bit) pointer. If your compiler does not support far pointers, you need
  1055.      to devise a method of creating them in order to use the functions in
  1056.      IPCLIB.LIB.
  1057.  
  1058.              void far ipc_error(unsigned int index)
  1059.  
  1060.      This is the error handler for any errors returned by IPC. If 'status'
  1061.      logically ANDed with IPC_STAT_ERROR is true, then a call to ipc_error
  1062.      with 'index' set to the value in the 'error' field of the
  1063.      IPC_PARAM_BLOCK will write a descriptive message to the standard
  1064.      output. Another method of error detection is to check if 'error' is
  1065.      non-zero.
  1066.  
  1067.      ipc_error is a "fatal" routine in that it terminates the process (your
  1068.      application). 'index' is returned to the parent process. If the parent
  1069.      process is a batch file running under DOS, then ERRORLEVEL can be used
  1070.      to determine the success of your application.
  1071.  
  1072.              void far init_param_block(IPC_PARAM_BLOCK far *param,
  1073.                                      unsigned int my_id,
  1074.                                      unsigned int to_id,
  1075.                                      unsigned int command,
  1076.                                      unsigned int size,
  1077.                                      void far *data_ptr)
  1078.  
  1079.      This routine initializes the data structure used for passing
  1080.      information to and from the memory-resident program IPC. 'param' is a
  1081.      far pointer to a variable of the type IPC_PARAM_BLOCK. 'data_ptr' is a
  1082.      far pointer to the data source or destination depending on the command
  1083.      used. The other parameters are unsigned integers. All parameters to
  1084.      init_param_block are required. Any fields in the IPC_PARAM_BLOCK that
  1085.      are not required for a particular command should be initialized to
  1086.      zero (or 0L for data_ptr).
  1087.  
  1088.              int far pc_ipc_installed(unsigned int vector)
  1089.  
  1090.      This routine determines if, indeed, the memory-resident program IPC is
  1091.      present at the specified vector. It returns true if IPC is installed,
  1092.      otherwise it returns false. Typically, this function call is made in
  1093.      an application's start-up, or initialization, routine.
  1094.  
  1095.              void far get_ipc_version(unsigned int vector,
  1096.                                      char far *version)
  1097.  
  1098.      Places a string that represents the version of IPC into the memory
  1099.      location pointed to by 'version'.
  1100.  
  1101.  
  1102.                                IPC User's Manual
  1103.           IPC 1.0                                                   22
  1104.  
  1105.  
  1106.          Creating main()
  1107.  
  1108.      Your application should contain 5 things in order to use the resident
  1109.      portion of IPC:
  1110.  
  1111.            1) the "#include pc-ipc.h" directive for the command, error, and
  1112.               status defines, the IPC_PARAM_BLOCK type definition, and the
  1113.               function prototypes
  1114.            2) a variable declaration of the type IPC_PARAM_BLOCK (or a
  1115.               pointer to a malloc'ed chunk of memory)
  1116.            3) a call to pc_ipc_installed to verify IPC's presence
  1117.            4) a call to init_param_block to initialize the IPC_PARAM_BLOCK
  1118.               with a command and parameters
  1119.            5) a call to pc_ipc
  1120.  
  1121.      Refer to the sample files TX_PROC.C and RX_PROC.C, distributed with
  1122.      this product, for the following discussion.
  1123.  
  1124.      For convenience, the IPC commands, status, error codes, and the
  1125.      IPC_PARAM_BLOCK have been defined in the C include file PC-IPC.H. To
  1126.      use them, your application should contain the "include" directive for
  1127.      PC-IPC.H. Refer to your C compiler manual for the proper use of
  1128.      quotes, angle brackets, and pathnames. To avoid possible conflicts
  1129.      with other included files, all definitions begin with "IPC".
  1130.  
  1131.      One or more variables of the type IPC_PARAM_BLOCK should be defined in
  1132.      your application to provide an interface with IPC. An alternate method
  1133.      would be to allocate memory for each IPC_PARAM_BLOCK required. Of
  1134.      course, a pointer to the malloc'ed memory should be maintained by your
  1135.      application. Both methods are demonstrated in TX_PROC.C and RX_PROC.C.
  1136.      In either case, the IPC_PARAM_BLOCK must be passed to pc_ipc using a
  1137.      far pointer.
  1138.  
  1139.      Your application should determine whether IPC is currently installed
  1140.      prior to any attempts to use it. Unpredictable results will occur if
  1141.      the application assumes it is calling IPC when in fact some other TSR
  1142.      or driver (or nothing at all!) is using the vector. A call to
  1143.      pc_ipc_installed will return 1 (IPC_TRUE) if IPC is installed, or 0
  1144.      (IPC_FALSE) if it is not. This facilitates the use of the boolean NOT
  1145.      (!) operator.
  1146.  
  1147.      A routine is provided to initialize an IPC_PARAM_BLOCK. Simply pass
  1148.      the values to be assigned and a far pointer to the parameter block.
  1149.      Typically, this routine is used just prior to a call to pc_ipc. Please
  1150.      note that even though a parameter may not be required for a particular
  1151.      command, you must supply all parameters to init_param_block. Unused
  1152.      parameters can be initialized to zero. Also note that 'data_ptr' is a
  1153.      far (32-bit) pointer. Therefore, when passing a null pointer (as in
  1154.      the case of IPC_CMND_DELID), it must be specified as "0L" (zero,
  1155.      long). If your C compiler does not support far pointers, you must
  1156.      devise a method of creating them in order to use IPC in your
  1157.      application.
  1158.  
  1159.      Some small data model C compilers provide variables that allow you to
  1160.  
  1161.  
  1162.                                IPC User's Manual
  1163.           IPC 1.0                                                   23
  1164.  
  1165.  
  1166.      create a far pointer. For example, Toolworks C, version 3.2, provides
  1167.      variables that it uses in its startup module, CRT0.OBJ. The variables
  1168.      '_code' and '_data' contain the code segment and data segment register
  1169.      values. The following code fragment illustrates how to create a far
  1170.      pointer in a small data model program:
  1171.  
  1172.              extern  unsigned int    _data;
  1173.                      unsigned long   far_ptr;
  1174.                      unsigned long   segment;
  1175.                      unsigned int    offset;
  1176.                      char            my_data[128];
  1177.  
  1178.              segment = (unsigned long)(_data) * 0x10;
  1179.              offset = &my_data;
  1180.              far_ptr = segment + offset;
  1181.  
  1182.      These demonstration applications exchange textual and integer data,
  1183.      but your application can send and retrieve any type of data. The only
  1184.      requirements IPC has are that a far pointer to the data and the size
  1185.      of the data be specified. For instance, if your application uses a
  1186.      video buffer, IPC could be the interface to allow "cut and paste"
  1187.      operations between processes.
  1188.  
  1189.      The application TX_PROC first verifies that IPC is installed at the
  1190.      default vector. It then checks to see if there is a message available
  1191.      for Process-0. If there is, it assumes that RX_PROC sent it and is
  1192.      waiting in another DESQview window. TX_PROC uses that message as
  1193.      'to_id' for sending its message to RX_PROC. In other words, TX_PROC
  1194.      takes on the process id of RX_PROC.
  1195.  
  1196.      If no message is available for Process-0, TX_PROC assumes that it is
  1197.      not running in a DESQview window. It then obtains a second process id
  1198.      and sends it as a message to Process-0 for RX_PROC to find (take on)
  1199.      later.
  1200.  
  1201.      Whether DESQview is running or not, TX_PROC sends some data to the
  1202.      process id assigned to the variable 'proc_2_id'. Provided that no
  1203.      errors occur, the Send process terminates normally.
  1204.  
  1205.      The Receive process, RX_PROC, verifies that IPC is installed and
  1206.      checks for a message addressed to process id 0. If no message is
  1207.      available, RX_PROC assumes that it is running in a DESQview window and
  1208.      that TX_PROC has not run yet. It then allocates a process id (used
  1209.      later as 'my_id') and sends it to Process-0 for TX_PROC to find (take
  1210.      on) later.
  1211.  
  1212.      If a message is available for Process-0, RX_PROC assumes that TX_PROC
  1213.      has already run and that RX_PROC is not running in a DESQview window.
  1214.      RX_PROC uses the data as 'my_id' for requesting data.
  1215.  
  1216.      If RX_PROC assumes it is running in a DESQview window, it uses the
  1217.      IPC_CMND_RDATAW (wait for data) command. Otherwise, it makes an
  1218.      immediate request for a message. A successfully retrieved message is
  1219.      displayed on the standard output.
  1220.  
  1221.  
  1222.                                IPC User's Manual
  1223.           IPC 1.0                                                   24
  1224.  
  1225.  
  1226.          Compiling and Linking
  1227.  
  1228.      IPCLIB.LIB was created using Turbo C (version 1.5) and was compiled
  1229.      using the Tiny memory model. But, as can be seen in the function
  1230.      prototypes declared in PC-IPC.H, the functions and pointers are all
  1231.      far-types. Turbo C recognizes the far-types in the function prototypes
  1232.      and automatically passes the correct parameter types regardless of the
  1233.      memory model used to compile and link your application. Refer to your
  1234.      C reference manual to determine if your compiler recognizes function
  1235.      prototypes and the extent of parameter checking in prototype
  1236.      declarations.
  1237.  
  1238.      IPCLIB.LIB is a "one size fits all" library in that it can be linked
  1239.      with objects compiled using any of the six memory models: tiny, small,
  1240.      medium, compact, large, and huge. In addition, IPCLIB.LIB does not
  1241.      reference any external functions and therefore does not require any
  1242.      run-time (external) libraries. This reduces the possibility of
  1243.      conflicts when linking and eliminates dependencies when executing.
  1244.  
  1245.      Below are two Turbo C examples of creating the executable file
  1246.      TX_PROC.EXE from the source file TX_PROC.C:
  1247.  
  1248.      Compile and Link in one command :
  1249.  
  1250.        TCC  -ml  -IC:\TURBOC\INCLUDE  -LC:\TURBOC\LIB  TX_PROC.C IPCLIB.LIB
  1251.  
  1252.        Compile TX_PROC.C using the large memory model. The include
  1253.        directory is c:\turboc\include. Link using the default libraries
  1254.        found in the directory c:\turboc\lib. Also use the library
  1255.        IPCLIB.LIB.
  1256.  
  1257.  
  1258.      Compile and Link in separate commands :
  1259.  
  1260.        TCC  -ml  -c  -IC:\TURBOC\INCLUDE  TX_PROC.C
  1261.  
  1262.        Compile TX_PROC.C using the large memory model. Compile to object
  1263.        file only. The include directory is c:\turboc\include.
  1264.  
  1265.        TLINK  C:\TURBOC\LIB\C0L.OBJ  TX_PROC.OBJ,  TX_PROC.EXE,
  1266.        TX_PROC.MAP,  IPCLIB.LIB  C:\TURBOC\LIB\CL.LIB
  1267.  
  1268.        Link the large-model startup module C0L.OBJ, TX_PROC.OBJ,
  1269.        IPCLIB.LIB, and the large-model run-time library CL.LIB to produce
  1270.        TX_PROC.EXE and TX_PROC.MAP.
  1271.  
  1272.  
  1273.                                IPC User's Manual
  1274.           IPC 1.0                                                   25
  1275.  
  1276.  
  1277.          Running TX_PROC and RX_PROC
  1278.  
  1279.      This section discusses how to run the two sample programs TX_PROC and
  1280.      RX_PROC. You should first run TX_PROC.EXE to store a message with IPC.
  1281.      You may specify the message to send by entering text on the command
  1282.      line. Otherwise, the default message "Howdy Doody and Buffalo Bob" is
  1283.      sent. The maximum amount of data that can be sent is 128 bytes. This
  1284.      is not a limitation of IPC or TX_PROC, but of DOS. Before you run
  1285.      either TX_PROC or RX_PROC, IPC must first be loaded. So if you type,
  1286.  
  1287.              A>tx_proc I read the news today, oh boy.
  1288.  
  1289.      TX_PROC should display the message you sent, what your process id was,
  1290.      and what process id the message was sent to.
  1291.  
  1292.      At this point, PC-IPC or RX_PROC may be used to retrieve the message.
  1293.      To use PC-IPC type:
  1294.  
  1295.          A>pc-ipc /i=1 /q
  1296.          1 Messages Available. 972 Bytes Free Space.IPC is Installed,
  1297.          Enabled.
  1298.          A>pc-ipc /i=1 /r
  1299.          I read the news today, oh boy.
  1300.  
  1301.      To use RX_PROC you need only type "rx_proc" at the command line.
  1302.  
  1303.      As was said earlier, IPC can also work within multi-processing systems
  1304.      such as DESQview. Make certain IPC is installed before starting
  1305.      DESQview. Otherwise, IPC is hidden within a DESQview window. Start
  1306.      DESQview and open a "DOS (128K)" window. Change to the directory that
  1307.      has RX_PROC.EXE and run it. The program will appear to "hang" because
  1308.      there are no messages available.
  1309.  
  1310.      Open another "DOS (128K)" window and change to the directory that has
  1311.      TX_PROC.EXE. Resize both windows so you can observe both processes
  1312.      simultaneously. Run TX_PROC. The message you send appears in the first
  1313.      window and both RX_PROC and TX_PROC terminate normally.
  1314.  
  1315.      PC-IPC can also be used in either DESQview window to send or retrieve
  1316.      (or both) messages.
  1317.  
  1318.      You are encouraged to use RX_PROC.C and TX_PROC.C as templates for
  1319.      trying all the functions available in IPCLIB.
  1320.  
  1321.  
  1322.                                IPC User's Manual
  1323.           IPC 1.0                                                   26
  1324.  
  1325.  
  1326.          Assembly Interface
  1327.  
  1328.      This section describes the use of IPC directly through Assembly
  1329.      routines. Two advantages of using an assembly interface to IPC (as
  1330.      with any program) are that program size is reduced and program speed
  1331.      is increased. A sample program is provided in the file IPCSAMP.ASM.
  1332.      IPCSAMP does not require IPCLIB, or any other externals, to use IPC.
  1333.      It demonstrates how to use IPC as you would any other Interrupt
  1334.      Service Routine (ISR).
  1335.  
  1336.      The structure of the parameter block passed to IPC is the same as used
  1337.      with IPCLIB (see 'IPC_PARAM_BLOCK struc' and 'param' in IPCSAMP.ASM).
  1338.      Required input fields are initialized, and output fields are returned,
  1339.      as they are with the C interface to IPCLIB.
  1340.  
  1341.      An example of determining whether IPC is installed is given in
  1342.      IPCSAMP. Older versions of DOS initialize unused interrupt vectors to
  1343.      0000:0000. Your application should check for this prior to calling any
  1344.      ISR, since undesirable results (system crash) could occur. Later
  1345.      versions of DOS typically set unused vectors to point to an IRET
  1346.      (return from interrupt) instruction. Making a call to an IRET is
  1347.      harmless but unproductive. Therefore, once your application determines
  1348.      that the vector is not 0000:0000, it is safe to call the interrupt
  1349.      with an IPC_CMND_INQUIRE command. You must then check the 'status'
  1350.      field for IPC_STAT_INSTALLED and IPC_STAT_ENABLED. Since it is
  1351.      improbable (but not guaranteed) that another ISR would set these bits
  1352.      in this field, it is safe to assume that IPC is installed.
  1353.  
  1354.      In order to call IPC, the data segment and offset of the parameter
  1355.      block are pushed onto the stack. Then the call to the ISR is made with
  1356.      the "int vector_num" instruction.
  1357.  
  1358.      One disadvantage of using assembly is that the command IPC_CMND_RDATAW
  1359.      (wait for data) behaves exactly as IPC_CMND_RDATA does. In order to
  1360.      have your assembly routine wait for data, a loop that continually
  1361.      calls IPC is required. The following code fragment provides an example
  1362.      of how to do this:
  1363.  
  1364.              cmp     param.command, RDATAW           ; RDATAW EQU 010h
  1365.              jne     normal_call
  1366.      ipc_loop:
  1367.              push    ds
  1368.              mov     ax, offset param.my_id
  1369.              push    ax
  1370.              int     IPC_VECTOR                      ; call IPC
  1371.              add     sp, 4                           ; clean up stack
  1372.              mov     cx, param.status
  1373.              and     cx, AVDATA_FLAG                 ; AVDATA_FLAG EQU 010h
  1374.              jz      ipc_loop
  1375.              jmp     process_data
  1376.  
  1377.      An example of assembling, linking, and running the Assembly interface
  1378.      program is provided in the block comment at the beginning of
  1379.      IPCSAMP.ASM.
  1380.  
  1381.  
  1382.                                IPC User's Manual
  1383.           IPC 1.0                                                   27
  1384.  
  1385.  
  1386.                                  ERROR MESSAGES
  1387.  
  1388.      This section lists the error messages that can occur using PC-IPC, the
  1389.      return status values for PC-IPC, and the error codes that can occur
  1390.      using IPCLIB.
  1391.  
  1392.          PC-IPC Error Messages
  1393.  
  1394.              IPC is not installed. Run IPCINST.COM.
  1395.  
  1396.      PC-IPC was unable to find IPC at the specified vector. IPCINST.COM
  1397.      must be run prior to PC-IPC.COM. If IPC is installed, possibly the /V
  1398.      parameter specified in the PC-IPC command line does not match the /V
  1399.      parameter used to install IPC.
  1400.  
  1401.              Invalid or missing parameter : parameter
  1402.  
  1403.      Any command line syntax errors will produce this message. The
  1404.      parameter found to be in error will appear after the colon. Check for
  1405.      the proper use of the parameter in the "Using PC-IPC.COM" section.
  1406.  
  1407.              Unable to open "filename" for output.
  1408.  
  1409.      This message appears if PC-IPC is unable to open the file specified in
  1410.      the /R=filename and /W=filename commands. Check for proper use of
  1411.      filename specifications in the DOS User's Manual.
  1412.  
  1413.              Unable to add "envvar" to shell environment.
  1414.  
  1415.      PC-IPC was unable to add the environment variable to the environment
  1416.      table. The probable cause of this error is insufficient environment
  1417.      table space to contain the data returned to PC-IPC. See "PC-IPC
  1418.      Parameters" in the IPC User's Manual for further information on the
  1419.      environment table. Remember, if the /B parameter is used, PC-IPC
  1420.      constructs an environment variable of the form IPCvvi=data.
  1421.  
  1422.  
  1423.                                IPC User's Manual
  1424.           IPC 1.0                                                   28
  1425.  
  1426.  
  1427.          PC-IPC Return Status
  1428.  
  1429.      PC-IPC returns the status of each operation in the DOS structure
  1430.      ERRORLEVEL (see the IF command in the DOS User's Manual). Using the IF
  1431.      ERRORLEVEL... construct allows your batch application to respond to
  1432.      the various conditions that can result using PC-IPC. Table 3 lists the
  1433.      errors and the corresponding ERRORLEVEL value returned by PC-IPC. Be
  1434.      aware that when testing ERRORLEVEL, the condition is true if
  1435.      ERRORLEVEL is equal to or greater than the value being tested. Example
  1436.      3 in the "PC-IPC Examples" section illustrates the use of ERRORLEVEL
  1437.      in a batch file.
  1438.  
  1439.      ______________________________________________________________________
  1440.  
  1441.              ERRORLEVEL      Condition
  1442.              ----------      ---------------------------------------
  1443.                  0           Normal termination
  1444.                  1           Invalid command or parameter
  1445.                  2           Only Process 0 can install / reset IPC
  1446.                  3           That process cannot enable IPC
  1447.                  4           IPC is not enabled
  1448.                  5           That process cannot disable IPC
  1449.                  6           Invalid destination process id
  1450.                  7           Invalid sending process id
  1451.                  8           Invalid data destination
  1452.                  9           No more process ids available
  1453.                 10           Cannot relinquish that process id
  1454.                 11           Message space is full, no free memory
  1455.                 12           IPC is not installed
  1456.  
  1457.           Table 3 - Status Values Returned in ERRORLEVEL. All PC-IPC
  1458.           commands return the status of the requested operation in
  1459.           DOS's ERRORLEVEL. These status values correspond to those
  1460.           found in the "IPCLIB Error Messages" section.
  1461.      ______________________________________________________________________
  1462.  
  1463.  
  1464.  
  1465.                                IPC User's Manual
  1466.           IPC 1.0                                                   29
  1467.  
  1468.  
  1469.          IPCLIB Error Messages
  1470.  
  1471.      The following are error messages written to the standard output when
  1472.      ipc_error is called with a value returned from IPC. The define for the
  1473.      error appears in parentheses after the descriptive text.
  1474.  
  1475.              Invalid command.
  1476.  
  1477.      IPC does not recognize the command code specified in the "command"
  1478.      field of the IPC_PARAM_BLOCK. (IPC_ERR_BADCMND)
  1479.  
  1480.              Only process 0 can install / reset IPC.
  1481.  
  1482.      The "my_id" field of the IPC_PARAM_BLOCK must be 0 (zero) in order to
  1483.      perform an IPC_CMND_INSTALL. (IPC_ERR_INST0)
  1484.  
  1485.              Only the disabling process can re-enable.
  1486.  
  1487.      The "my_id" field contains a different process id for the
  1488.      IPC_CMND_ENABLE command than was specified for the IPC_CMND_DISABLE
  1489.      command. The ids must be identical. (IPC_ERR_CANTENAB)
  1490.  
  1491.              IPC is currently disabled.
  1492.  
  1493.      The command could not be processed because IPC is disabled.
  1494.      (IPC_ERR_NOTENAB)
  1495.  
  1496.              This process cannot disable IPC.
  1497.  
  1498.      IPC does not recognize the process id specified in the "my_id" field.
  1499.      Only registered process ids (those marked "in-use") may disable IPC.
  1500.      (IPC_ERR_CANTDISAB)
  1501.  
  1502.              The to-process id is not valid.
  1503.  
  1504.      The "to_id" field contains a process id that is not considered valid
  1505.      by IPC. Either a recognized id may be obtained from IPC using the
  1506.      IPC_CMND_REQID command, or use a number between 0 and 9.
  1507.      (IPC_ERR_BADTOID)
  1508.  
  1509.              The from-process id is not valid.
  1510.  
  1511.      The "my_id" field contains a process id that is not considered valid
  1512.      by IPC. Either a recognized id may be obtained from IPC using the
  1513.      IPC_CMND_REQID command, or use a number between 0 and 9.
  1514.      (IPC_ERR_BADFMID)
  1515.  
  1516.              Invalid target address for data.
  1517.  
  1518.      The far pointer specified in the "data_ptr" field is invalid (usually
  1519.      0000:0000 if not initialized). (IPC_ERR_NOADDR)
  1520.  
  1521.              All available process ids are in use.
  1522.  
  1523.  
  1524.  
  1525.                                IPC User's Manual
  1526.           IPC 1.0                                                   30
  1527.  
  1528.  
  1529.      All available process ids (0 through 9) are in use. A process id must
  1530.      be relinquished (IPC_CMND_DELID command) before another can be
  1531.      allocated. (IPC_ERR_MAXIDS)
  1532.  
  1533.              That process id cannot be relinquished.
  1534.  
  1535.      A request to relinquish a process id (IPC_CMND_DELID command) was made
  1536.      for a process id that is not currently in use. (IPC_ERR_CANTRELI)
  1537.  
  1538.              Insufficient memory available for message.
  1539.  
  1540.      IPC has run out of message space. Either request messages
  1541.      (IPC_CMND_RDATA, IPC_CMND_RDATAW commands) to free some message space,
  1542.      or increase the message space during installation with a larger value
  1543.      specified in the /A=nn parameter. (IPC_ERR_NOMEM)
  1544.  
  1545.              IPC is not installed. Run IPCINST.COM.
  1546.  
  1547.      IPC must be installed (memory resident) before it can be used. This
  1548.      error typically occurs when the /V=xx parameter specified during
  1549.      installation of IPC does not match the /V=xx parameter used by PC-
  1550.      IPC.
  1551.  
  1552.  
  1553.                                IPC User's Manual
  1554.           IPC 1.0                                                   31
  1555.  
  1556.  
  1557.                               PURCHASE INFORMATION
  1558.  
  1559.      This set of files is not part of the public domain. It is presented as
  1560.      a commercial product, and the right to use it must be purchased. This
  1561.      product may be freely copied and distributed, provided that the
  1562.      individual files remain as a set and that no part of this product is
  1563.      modified in any way. Any person, association, user group, institution,
  1564.      governing body, agency, or business that uses this product in whole or
  1565.      in part, is obligated to purchase the right to use it. Use of this
  1566.      product without compensation is theft.
  1567.  
  1568.      A large amount of work went into the development of the software,
  1569.      documentation, and examples in this product. Every effort has been
  1570.      made to insure accuracy, completeness, and that it performs as stated.
  1571.      Any malfunctions, inconsistencies, omissions, or errors are
  1572.      unintentional. Donnelly Software Engineering is not responsible for
  1573.      any loss due to the use or misuse of this product or its parts.
  1574.  
  1575.      Licensed users of this product are encouraged to contact Donnelly
  1576.      Software Engineering with comments or problems associated with its
  1577.      use. Donnelly Software Engineering may be contacted in writing at the
  1578.      address given below, by telephone at (714) 970-9612, or through
  1579.      CompuServe (user id 72647, 2543). Response to contacts from unlicensed
  1580.      users will be minimal.
  1581.  
  1582.      To become a licensed user of this product, complete the form below (or
  1583.      a reasonable facsimile) and sent it, along with a payment of $35.00
  1584.      (US) for each license, to:
  1585.  
  1586.                          DONNELLY SOFTWARE ENGINEERING
  1587.                                5082 WENDOVER RD.
  1588.                              YORBA LINDA, CA  92686
  1589.  
  1590.      Thank you for your patronage and support.
  1591.  
  1592.  
  1593.                                IPC User's Manual
  1594.           IPC 1.0                                                   32
  1595.  
  1596.  
  1597.           ------------------------------------------------------------
  1598.  
  1599.                          DONNELLY SOFTWARE ENGINEERING
  1600.                                5082 WENDOVER RD.
  1601.                              YORBA LINDA, CA  92686
  1602.                                  (714) 970-9612
  1603.                              CompuServe 72647, 2543
  1604.  
  1605.                                LICENSE AGREEMENT
  1606.  
  1607.           I agree to purchase _____ license(s) to use the product
  1608.           known as IPC, at $35.00 per license, from Donnelly Software
  1609.           Engineering. I understand and agree to the following terms
  1610.           and conditions:
  1611.  
  1612.               1) A single license entitles the licensee to use this
  1613.                  product on a single computer.
  1614.               2) Separate copies of this product, or its parts, each
  1615.                  require a license.
  1616.               3) Donnelly Software Engineering is not responsible for
  1617.                  any loss incurred due to the use or misuse of this
  1618.                  product.
  1619.  
  1620.           Thank you for your patronage and support.
  1621.  
  1622.           Name : _____________________________________________________
  1623.  
  1624.           Institution, Position : ____________________________________
  1625.  
  1626.           Address : __________________________________________________
  1627.  
  1628.           City, State, Zip : _________________________________________
  1629.  
  1630.           Signed : ___________________________________________________
  1631.  
  1632.  
  1633.           ------------------------------------------------------------
  1634.  
  1635.  
  1636.  
  1637.                                IPC User's Manual
  1638.           IPC 1.0                                                   33
  1639.  
  1640.  
  1641.  
  1642.                                 ACKNOWLEDGMENTS
  1643.  
  1644.      MS-DOS is a trademark of Microsoft Corporation.
  1645.  
  1646.      DESQview is a trademark of Quarterdeck Office Systems.
  1647.  
  1648.      8088, 80286, 80386 are trademarks of Intel Corporation.
  1649.  
  1650.      PC, XT, AT, MDA, CGA, EGA, VGA are trademarks of International
  1651.      Business Machines Corporation.
  1652.  
  1653.      Turbo C is a trademark of Borland International, Incorporated.
  1654.  
  1655.      CompuServe is a trademark of CompuServe Incorporated.
  1656.  
  1657.      Toolworks C is a trademark of The Software Toolworks.
  1658.  
  1659.      PC-IPC.COM, IPCINST.COM, IPCLIB.LIB, PC-IPC.H, PC-IPC.DOC and the IPC
  1660.      User's Manual are Copyrighted (c) 1989 Donnelly Software Engineering.
  1661.  
  1662.  
  1663.  
  1664.                                      INDEX
  1665.  
  1666.  
  1667.  
  1668.                     /A parameter...........................3
  1669.                     /B parameter...........................7
  1670.                     /D command.............................6
  1671.                     /E command.............................6
  1672.                     /G command.............................7
  1673.                     /H command.............................6
  1674.                     /I parameter...........................8
  1675.                     /Q command.............................6
  1676.                     /R command.............................6
  1677.                     /S command.............................5
  1678.                     /V parameter, IPCINST..................3
  1679.                     /V parameter, PC-IPC...................8
  1680.                     /W command.............................6
  1681.                     allocate memory, parameter.............3
  1682.                     assembly..............................26
  1683.                     AUTOEXEC.BAT...........................2
  1684.                     batch mode, parameter..................7
  1685.                     C bindings............................21
  1686.                     commands, Communication................5
  1687.                     commands, Control......................6
  1688.                     commands, Information..................6
  1689.                     commands, IPC.........................16
  1690.                     commands, PC-IPC.......................5
  1691.                     commands, Routing......................7
  1692.                     CONFIG.SYS, environment size in........7
  1693.                     data, exchange with IPC...............14
  1694.                     default process id.....................8
  1695.                     default vector.........................8
  1696.                     DESQview, installing...................2
  1697.                     DESQview, running.....................25
  1698.                     disable, command.......................6
  1699.                     enable, command........................6
  1700.                     environment variables..................7
  1701.                     environment, size......................7
  1702.                     ERRORLEVEL, return value..............28
  1703.                     errors, IPCLIB........................29
  1704.                     errors, PC-IPC........................27
  1705.                     example, batch mode...................11
  1706.                     example, batch mode in DESQview.......12
  1707.                     example, command line..................9
  1708.                     FILLIPC.BAT...........................12
  1709.                     get id, command........................7
  1710.                     help, command..........................6
  1711.                     id, parameter..........................8
  1712.                     inquiry, command.......................6
  1713.                     installing IPC.........................2
  1714.                     instances, IPCINST.....................3
  1715.                     Interrupt Service Routine.............26
  1716.                     IPC data structure....................14
  1717.                     IPCINST.COM............................1
  1718.                     IPCLIB.LIB.............................1
  1719.                     IPC_PARAM_BLOCK.......................14
  1720.                     ISR...................................26
  1721.  
  1722.  
  1723.  
  1724.                                      INDEX
  1725.  
  1726.  
  1727.                     IVT, Interrupt Vector Table............3
  1728.                     main()................................22
  1729.                     memory models, supported..............24
  1730.                     memory, usage..........................3
  1731.                     MTIPC.BAT.............................12
  1732.                     multi-tasking..........................2
  1733.                     NULL terminated strings................5
  1734.                     overhead, message......................5
  1735.                     Parameters, PC-IPC.....................7
  1736.                     path, DOS..............................2
  1737.                     PC-IPC.COM.............................1
  1738.                     PC-IPC.DOC.............................1
  1739.                     PC-IPC.H...............................1
  1740.                     process ids............................7
  1741.                     process, DOS...........................8
  1742.                     recognized process id..................7
  1743.                     request data, command..................6
  1744.                     send data, command.....................5
  1745.                     setvar, use with /B....................7
  1746.                     status, IPC...........................19
  1747.                     status, returned by PC-IPC............28
  1748.                     TSR, Terminate-Stay-Resident...........1
  1749.                     usage, IPCINST.COM.....................3
  1750.                     usage, PC-IPC.COM......................5
  1751.                     valid process id.......................7
  1752.                     vector, IPCINST parameter..............3
  1753.                     vector, PC-IPC parameter...............8
  1754.                     vectors, available.....................3
  1755.                     wait for data, command.................6
  1756.  
  1757.